/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.ronsicecream.pos.master.outlet;

import com.buanalintas.bynga.Field;
import com.buanalintas.bynga.Page;
import com.ronsicecream.pos.entities.PosMasterOutlet;

/**
 *
 * @author user
 */
public class Outlet extends Page {

    private Field outletId;
    private Field outletName;
    private Field outletAddress;
    private Field outletPhone;
    private Field outletRegionalId;
    private Field outletEmail;
    private Field outletContact;
    private Field outletContactPhone;
    private Field outletContactEmail;
    private Field outletDescription;

    public Outlet() {
        super();

        setTheClass(PosMasterOutlet.class);




        outletId = new Field();
        outletId.setName("outletId");
        outletId.setCaption("outlet id");
        //outletId.setInfo("outlet id");
        outletId.setListProperties(" align=\"left\" width=\"1%\" nowrap");
        outletId.setInputProperties(" size=\"20\"");
        getFields().add(outletId);

//        outletRegionalId = new Field();
//        outletRegionalId.setName("outletRegionalId");
//        outletRegionalId.setCaption("regional");
//        //mainKitchenContact.setInfo("main kitchen contact");
//        outletRegionalId.setListProperties(" align=\"left\" width=\"10%\" nowrap");
//        outletRegionalId.setInputProperties(" size=\"20\"");
//        outletRegionalId.setRequired(true);
//        getFields().add(outletRegionalId);


        outletName = new Field();
        outletName.setName("outletName");
        outletName.setCaption("name");
        //outletName.setInfo("outlet name");
        outletName.setListProperties(" align=\"left\" width=\"20%\" nowrap");
        outletName.setInputProperties(" size=\"20\"");
        outletName.setRequired(true);
        getFields().add(outletName);

        outletAddress = new Field();
        outletAddress.setName("outletAddress");
        outletAddress.setCaption("address");
        //outletAddress.setInfo("outlet address");
        outletAddress.setListProperties(" align=\"left\" width=\"30%\" nowrap");
        outletAddress.setInputProperties(" cols=\"50\" rows=\"5\"");
        outletAddress.setInputType(Field.INPUT_TEXT_AREA);
        outletAddress.setInputCase(Field.CASE_UPPER);
        outletAddress.setRequired(true);
        getFields().add(outletAddress);

        outletPhone = new Field();
        outletPhone.setName("outletPhone");
        outletPhone.setCaption("phone");
        //outletPhone.setInfo("outlet phone");
        outletPhone.setListProperties(" align=\"left\" width=\"5%\" nowrap");
        outletPhone.setInputProperties(" size=\"20\"");
        outletPhone.setRequired(true);
        getFields().add(outletPhone);


//        outletEmail = new Field();
//        outletEmail.setName("outletEmail");
//        outletEmail.setCaption("email");
//        //outletEmail.setInfo("outlet email");
//        outletEmail.setListProperties(" align=\"left\" width=\"10%\" nowrap");
//        outletEmail.setInputProperties(" size=\"20\"");
//        outletEmail.setRequired(true);
//        getFields().add(outletEmail);
//        
//        outletContact = new Field();
//        outletContact.setName("outletContact");
//        outletContact.setCaption("contact");
//        //outletContact.setInfo("outlet contact");
//        outletContact.setListProperties(" align=\"left\" width=\"10%\" nowrap");
//        outletContact.setInputProperties(" size=\"20\"");
//        outletContact.setRequired(true);
//        getFields().add(outletContact);
//        
//        outletContactPhone = new Field();
//        outletContactPhone.setName("outletContactPhone");
//        outletContactPhone.setCaption("phone");
//        //outletContactPhone.setInfo("outlet contact phone");
//        outletContactPhone.setListProperties(" align=\"left\" width=\"5%\" nowrap");
//        outletContactPhone.setInputProperties(" size=\"20\"");
//        outletContactPhone.setRequired(true);
//        getFields().add(outletContactPhone);
//        
//        outletContactEmail = new Field();
//        outletContactEmail.setName("outletContactEmail");
//        outletContactEmail.setCaption("email");
//        //outletContactEmail.setInfo("outlet contact email");
//        outletContactEmail.setListProperties(" align=\"left\" width=\"10%\" nowrap");
//        outletContactEmail.setInputProperties(" size=\"20\"");  
//        outletContactEmail.setRequired(true);
//        getFields().add(outletContactEmail);
//        
        outletDescription = new Field();
        outletDescription.setName("outletDescription");
        outletDescription.setCaption("description");
        //outletDescription.setInfo("outlet description");
        outletDescription.setListProperties(" align=\"left\" width=\"40%\" nowrap");
        outletDescription.setInputProperties(" cols=\"50\" rows=\"5\"");
        outletDescription.setInputType(Field.INPUT_TEXT_AREA);
        outletDescription.setInputCase(Field.CASE_UPPER);
        getFields().add(outletDescription);




        fillFields();
        setExportList(getClass().getResourceAsStream("OutletList.jasper"));
        setExport(getClass().getResourceAsStream("Outlet.jasper"));

        getFieldsAdd().remove(outletId);
        getFieldsEdit().remove(outletId);
        getFieldsList().remove(outletId);
        getFieldsView().remove(outletId);
    }
}
